/*
	FileName : JT_C_REC_Wave.h
	Description :
	Created on 2017.11.04 by WFL.

	Revision History:

*/



#ifndef  __JT_C_REC_WAVE_20171104__
#define  __JT_C_REC_WAVE_20171104__


#include "stdint.h"



#define ANALOG_FILE_SEC_CNT			366u
#define ANALOG_FILE_LEN				((uint32_t)ANALOG_FILE_SEC_CNT << 9)

#define ANALOG_BEGIN_10S_CNT		125000u

/*
 * wave file params:
 * No require address align, no require subfield order.
*/
typedef struct{
	uint8_t		RecordMethod;		/// 0--Normal; 1--Continous
	uint8_t		newWaveStart;		/// If 1, a new wave is sampling rigth now.
	uint32_t	AnaFileSampleCnt;	/// count to mark if a whole wave have been sampled.
	
	uint8_t		RecordIndex;		/// Analog file : ping-pang
	
	uint8_t		AnaFilePrevLed[2];	/// -----------------
	uint8_t		AnaFileLed[2];		/// key requirement  |
	uint8_t		AnaLedNoCode[2];	///                  |
	uint8_t 	waveJYJChanged[2];	/// ----------------- if JYJ change in wave time.
	
	uint8_t		AnaFileValid[2];	///
	uint32_t	AnaFileTime[2];		///
	uint32_t	AnaSampleStartIndex[2];///

	
}JTC_REC_WAVE, *pJTC_REC_WAVE;

extern JTC_REC_WAVE JTC_wave;








//--------------------------------------------------------------------------


void JTC_REC_WAVE_init(JTC_REC_WAVE *j_wave);

uint8_t JTC_REC_WAVE_IsKey(JTC_REC_WAVE *jtc_W,uint8_t index);


#endif




///EOF


